package com.uni.tag_group.activity;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import com.uni.tag_group.R;
import com.uni.tag_group.databinding.ActivityTagArrowBinding;

public class TagArrowActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityTagArrowBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_tag_arrow);

        findViewById(R.id.btn).setOnClickListener(view -> {
            binding.tagView.selectTextHighLight("赋值并高亮状态");
        });

        String[] tag = new String[]{"区域", "价格", "户型", "更多","排序"};
        // 设置数据
        binding.tagView.setData(tag);
        // 监听点击
        binding.tagView.setOnTabChangeListener((v, index, isOpen) -> {

        });
        // 修改标签文本并高亮--索引为最后点击的
        // binding.tagView.selectTextHighLight();
        // 恢复初始值 包含图标方向+图标颜色
        // binding.tagView.defaultStatus();
        // 图标恢复关闭状态--颜色保持
        // binding.tagView.closeIocn();
    }
}
